Passed
Push — master ( 55414e...5f39f4 )
by Björn
03:25
created

T_FUNCTION ➔ getStatistics   B

Complexity

Conditions 1
Paths 128

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
rs 8.8571
c 0
b 0
f 0
cc 1
nc 128
crap 2
nop 0
1
2
function getStatistics () {
3
	
4 25
	return {
5
		
6
		patternscount   : Object.keys(this.listpatterns()).length || 0,
7
		
8
		categoriescount : Object.keys(this.listcategories()).length || 0,
9
		
10
		atomscount      : Object.keys(this.listpatterns('atom')).length || 0,
11
		
12
		moleculescount  : Object.keys(this.listpatterns('molecule')).length || 0,
13
		
14
		organismscount  : Object.keys(this.listpatterns('organism')).length || 0,
15
		
16
		templatescount : Object.keys(this.listpatterns('templates')).length || 0,
17
		
18
		pagescount     : Object.keys(this.listpatterns('pages')).length || 0,
19
		
20
	}
21
	
22
}
23
24
module.exports = getStatistics;